feat: add LocationService.createInputField method#833
Merged
Conversation
Add support for creating input fields via the public V2 API endpoint POST /input-fields. Includes a type-safe discriminated union covering all 9 input field types (TEXT, SELECT, EMAIL, PHONE_NUMBER, FIRST_NAME, LAST_NAME, URL, DATE, NUMERIC) with per-type properties.
Follow existing one-type-per-file pattern (ticket-extra-option.ts, opening-hours-time.ts, etc.) by splitting the monolithic input-field-creation-request.ts into 16 individual files.
Replace inline { id: number } with named LocationRef and LineRef
interfaces in InputFieldBase, matching the server's ref pattern.
Move the duplicated V2 API version header into a shared v2-headers.ts module, reused by both location and ticket services. Remove unused InputFieldType. Add test for minimal FIRST_NAME field creation.
KonradPaluch
approved these changes
Mar 27, 2026
Remove duplicate JSDoc from implementation function, remove V2 header implementation detail from service docs, and remove internal InputFieldBase from public API exports.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
LocationService.createInputField()— callsPOST /input-fieldswith V2 headerInputFieldBaseV2_HEADERSconstant reused by location and ticket servicesTest plan